package com.gujiangbo.multithreadskill;

import java.io.IOException;
import java.nio.CharBuffer;

public class RunnableTest {

    public static void main(String[] args) {
        new Thread(new MyRun(), "MyRun").start();
        System.out.println("run end..");
    }
}


class MyRun implements Runnable {
    public void run() {
        try {
            for (int i = 0; i < 20; i++) {
                Thread.sleep(2000);
                System.out.println("run name is " + Thread.currentThread().getName());
            }

        } catch (Exception e) {

        }
    }
}
